package com.itlong.cloud.commons.dao;

import com.itlong.cloud.POJO.PO.DeviceElevatorInfoPO;
import com.itlong.cloud.abstracts.IAbstractBaseDao;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <desc>
 *     阿里Iot云电梯设备服务数据接口
 * </desc>
 */
@Mapper
@Repository
public interface IDeviceElevatorInfoDao  extends IAbstractBaseDao<DeviceElevatorInfoPO> {

    int updateByNotNull(DeviceElevatorInfoPO deviceElevatorInfoPO);

    int batchUpdateEelevatorWorkStatus(List<DeviceElevatorInfoPO> list);

    /**
     * <desc>
     *      根据电梯设备序列号获取固件版本
     * </desc>
     *
     * @param deviceUnique
     * @return
     * @author Jiaqi.X
     * @createDate 2018/11/30
     */
    String getVersionByDeviceUnique(@Param("deviceUnique")String deviceUnique);

    /**
     * <desc>
     *      根据楼层名称查询真实楼层
     * </desc>
     *
     * @param logicFloor
     * @return
     * @author Jiaqi.X
     * @createDate 2018/11/30
     */
    String getFloorNumByLogicFloor(@Param("logicFloor") String logicFloor,@Param("deviceUnique") String deviceUnique);
}
